package com.l.filter;


import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

/**
 * @param
 * @author wl
 * @date 2018/5/11 17:05
 * @return
 */

public class QueueMessageListener implements MessageListener {
    /**
     * @param [message]
     * @return void
     * @author wl
     * @date 2018/5/11 17:07
     */
    public void onMessage(Message message) {
        TextMessage tm = (TextMessage) message;
        try {
            System.out.println("QueueMessageListener监听到了文本消息：\t"
                    + tm.getText());
            //do something ...
        } catch (JMSException e) {
            e.printStackTrace();
        }
    }
}
